/*
 * @Author: ruins
 * @Date: 2022-01-17 14:13:27
 * @LastEditors: ruins
 * @LastEditTime: 2022-01-19 12:21:54
 * @FilePath: \white-dragon\src\apis\positon.js
 */
import request from '@/utils/request'

/* 获取热门城市数据列表 */
export function getHotCity () {
  return request({
    url: '/hotcity',
    method: 'get'
  })
}

/* 获取省份城市数据 */
export function getMapInfo () {
  return request({
    url: '/map',
    method: 'get'
  })
}

/* 获取招聘信息 */
export function getCompanyInfo () {
  return request({
    url: '/company',
    method: 'get'
  })
}

/* 筛选数据 */
export function filterCompanyInfo (data) {
  return request({
    url: `/company?experience_level_gte=${data.experience}&education_level_gte=${data.education}&salary_level_gte=${data.salary}&cname_like=${data.name}`,
    method: 'get'
  })
}

/* 城市筛选 */
export function filterCity (city) {
  return request({
    url: `/company?city_like=${city}`,
    method: 'get'
  })
}

/* 获取岗位描述 */
export function getDescribe (id) {
  console.log(id)
  return request({
    url: `/describe/${id}`,
    method: 'get'
  })
}
